﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AddIn.EA.Architecture.ComponentLogic.EAConverter
{
    public sealed class EAConverterFactory
    {
        public static EAConverter GetConverter(ElementModel.BaseModel model)
        {
            EAConverter converter = null;
            
            if (model is ElementModel.Package)
                converter = new EAConverterPackage();
            else if (model is ElementModel.Element)
                converter = new EAConverterElement();
            else if (model is ElementModel.Method)
                converter = new EAConverterMethod();
            else if (model is ElementModel.Attribute)
                converter = new EAConverterAttribute();

            return converter;
        }
    }
}
